#include "RightPanel.hpp"

RightPanel::RightPanel():StackPanel(800-160, 0, 200, 0, Panel::BindRight | Panel::VerticalStretch, 1) {
    background.setSize(sf::Vector2f(rect.width, rect.height));
    sf::Color bgColor = sf::Color::Black;
    bgColor.a = 205;
    background.setFillColor(bgColor);
    add(&background);
 }

void RightPanel::onResize(int width, int height){
    Panel::onResize(width, height);
    background.setSize(sf::Vector2f(rect.width, height));
    for(int i = 0; i < interfaceElements.size(); i++){
        interfaceElements.at(i)->onResize(width, height);
    }
 }